﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using Volo.Abp.Domain.Entities;

namespace MetroManagement
{
    /// <summary>
    /// 线路类
    /// </summary>
    public class Line : BasicAggregateRoot<int>
    {
        /// <summary>城市Id</summary>
        public int CityId { get; protected set; }

        /// <summary>名称</summary>
        public string Name { get; protected set; }

        /// <summary>首班时间</summary>
        public string StartTime { get; protected set; }

        /// <summary>末班时间</summary>
        public string EndTime { get; protected set; }

        /// <summary>运行长度</summary>
        public int Km { get; protected set; }

        /// <summary>城市</summary>
        [ForeignKey("CityId")]
        public City City { get; protected set; }

        /// <summary>站点集合</summary>
        public IList<LineStation> LineStations { get; protected set; }

        private Line() { }
    }
}